package com.tapstitch.scm.common.utils.excel;


import com.tapstitch.scm.common.utils.excel.annotation.ExcelColumn;

/**
 * 列信息的描述数据
 */
public class ColumnMeta {

    /** 列名 */
    private String columnName;
    /** 数据model的字段名 */
    private String classField;

    private String parentClassField;

    /** 顺序 */
    private int order;

    private ExcelColumn.ExcelCellStyle[] cellStyles;

    private ExcelColumn.CellValueType cellValueType;

    public ColumnMeta(ExcelColumn excelColumn, String classField, String parentClassField){
        this.columnName = excelColumn.name();
        this.classField = classField;
        this.order = excelColumn.order();
        this.cellStyles = excelColumn.styles();
        this.cellValueType = excelColumn.valueType();
        this.parentClassField = parentClassField;
    }

    public ColumnMeta(ExcelColumn excelColumn, String classField){
        new ColumnMeta(excelColumn, classField, null);
    }



    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getClassField() {
        return classField;
    }

    public void setClassField(String classField) {
        this.classField = classField;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public ExcelColumn.ExcelCellStyle[] getCellStyles() {
        return cellStyles;
    }

    public void setCellStyles(ExcelColumn.ExcelCellStyle[] cellStyles) {
        this.cellStyles = cellStyles;
    }

    public ExcelColumn.CellValueType getCellValueType() {
        return cellValueType;
    }

    public void setCellValueType(ExcelColumn.CellValueType cellValueType) {
        this.cellValueType = cellValueType;
    }

    public String getParentClassField() {
        return parentClassField;
    }

    public ColumnMeta setParentClassField(String parentClassField) {
        this.parentClassField = parentClassField;
        return this;
    }
}
